<?$user=$model;if($user->id==0){	$roles=array();}else{	$roles=$user->roles->select_list('id');}?><div class='contentheader'>User</div><?echo form::open(NULL, array(), $hidden);echo form::open_fieldset();echo '<p>';echo form::label('username', 'Username');echo form::input('username',$user->username, 'class="text"');echo '</p>';echo '<p>';echo form::label('password', 'New Password');echo form::password('password', '','class="text"');echo '</p>';echo '<p>';echo form::label('email', 'Email');echo form::input('email', $user->email,'class="text"');echo '</p>';$allroles=ORM::factory('role')->find_all();foreach($allroles as $role){	$hasrole=array_key_exists($role->id, $roles);	echo '<p>';	echo form::label("roles[".$role->id."]", $role->name);	echo form::hidden("roles[".$role->id."]", 0);	echo form::checkbox("roles[".$role->id."]", 1 ,$hasrole);	echo '</p>';}echo form::close_fieldset();echo myform::submit_small();echo form::close();?>